]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Don't create window in startup phase
authorBalló György <ballogyor@gmail.com>
Wed, 9 Apr 2025 22:28:43 +0000 (00:28 +0200)
committerBalló György <ballogyor@gmail.com>
Wed, 9 Apr 2025 22:37:39 +0000 (00:37 +0200)
This fixes the problem that the process does not exit after timeout when
running as GApplication service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3689>

subprojects/extensions-app/js/main.js

index c164c514f12ff4f4683a7c441de9c751bdfd2f5d..07a5130bb35499545086d74c19d23bf5a52a3013 100644 (file)
@@ -28,6 +28,10 @@ class Application extends Adw.Application {
 
     vfunc_activate() {
         this._extensionManager.checkForUpdates();
+
+        if (!this._window)
+            this._window = new ExtensionsWindow({application: this});
+
         this._window.present();
     }
 
@@ -37,15 +41,13 @@ class Application extends Adw.Application {
         this.add_action_entries(
             [{
                 name: 'quit',
-                activate: () => this._window.close(),
+                activate: () => this._window?.close(),
             }]);
 
         this.set_accels_for_action('app.quit', ['<Primary>q']);
         this.set_accels_for_action('window.close', ['<Primary>w']);
 
         this._extensionManager = new ExtensionManager();
-
-        this._window = new ExtensionsWindow({application: this});
     }
 });